package exception;

/**
 * illegal 非法的
 * 自定义异常
 * 自定义异常通常用于那些满足语法但不满足业务场景的地方使用
 * <p>
 * 自定义异常
 * 1 类名知名见义
 * 2 继承Exception
 * 3 提供所有构造器
 */
public class IllegalAgeException extends Exception {
    public IllegalAgeException(){}
    public IllegalAgeException(String message){
        super(message);
    }

    public IllegalAgeException(String message, Throwable cause) {
        super(message, cause);
    }

    public IllegalAgeException(Throwable cause) {
        super(cause);
    }

    public IllegalAgeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
